<?php
class Grid_Product_Status extends OeZend_Widget_Grid {
    public function init() {

        $collectionColumn = new OeZend_Widget_Grid_Collection_Column();

        $idColumn = new OeZend_Widget_Grid_Column('id');
        $idColumn->addAttribute(array('class' => 'center', 'width' => '4%'));

        $productNameColumn = new OeZend_Widget_Grid_Column('title');
        $productNameColumn->setFilter('Text');

        $sortingNumberColumn = new OeZend_Widget_Grid_Column('sorting_number');

        $linkColumn = new OeZend_Widget_Grid_Column();
        $linkColumn->setLabel('Edit');
        $link = '<a href="/admin/order-status/update/id/${id}"><i class="icon-edit"></i></a>';
        $linkColumn->setContent(new OeZend_Widget_Grid_Column_Content_Template($link));
        $linkColumn->addAttribute(array('class' => 'center', 'width' => '4%'));

        $linkDeleteColumn = new OeZend_Widget_Grid_Column();
        $linkDeleteColumn->setLabel('Delete');
        $linkDelete = '<a href="/admin/order-status/delete/id/${id}" class="must-confirm"><i class="icon-remove"></i></a>';
        $linkDeleteColumn->setContent(new OeZend_Widget_Grid_Column_Content_Template($linkDelete));
        $linkDeleteColumn->addAttribute(array('class' => 'center', 'width' => '4%'));

        $collectionColumn->addColumns(
                  array(
                        $idColumn,
                        $productNameColumn,
                        $sortingNumberColumn,
                        $linkColumn,
                        $linkDeleteColumn,
                       ));

        $this->setCollectionColumn($collectionColumn);
    }
}


